var fs = require('fs');

var exec = require('child_process').exec;

fs.watch('D:/code/new_api/tp/app',{
	persistent: true,
	recursive: false
},function(event,filename){
	console.log(filename,event)
	// 改变
	if(filename && filename.indexOf('.php') > 0){
		if(event == 'change' || event == 'rename'){
			console.log('改变')
			exec('node t.js')
			exec('node start.js')
		}
	}
	
});